home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // Copyright (C) 1997-2001 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: April 21 1997
- //
- //
- // Description:
- // Global function to ensure the options for bevel plus are set.
- //
- // Input Arguments:
- // Force the factory setting or not.
- //
- // Return Value:
- // None.
- //
-
- global proc bevelPlusSetOptionVars(
- int $forceFactorySettings )
- //
- //
- //
- {
- if ($forceFactorySettings || !`optionVar -exists bevelPlusWidth`) {
- optionVar -floatValue bevelPlusWidth 0.1 ;
- }
-
- if ($forceFactorySettings || !`optionVar -exists bevelPlusDepth`) {
- optionVar -floatValue bevelPlusDepth 0.1 ;
- }
-
- if ($forceFactorySettings || !`optionVar -exists bevelPlusExtrudeHeight`) {
- optionVar -floatValue bevelPlusExtrudeHeight 0.25 ;
- }
-
- // Bevel curves forced to straight
- //
- if ($forceFactorySettings || !`optionVar -exists innerStyleBevelCurve`){
- optionVar -intValue innerStyleBevelCurve 0;
- }
- if ($forceFactorySettings || !`optionVar -exists outerStyleBevelCurve`){
- optionVar -intValue outerStyleBevelCurve 0;
- }
-
- // attach Surfaces.
- // attach is set to true.
- //
- if ($forceFactorySettings || !`optionVar -exists bevelPlusAttachSurfaces`){
- optionVar -intValue bevelPlusAttachSurfaces 1;
- }
-
- // Bevel inner curve same as outer
- //
- if ($forceFactorySettings || !`optionVar -exists innerStyleSameAsOuter`){
- optionVar -intValue innerStyleSameAsOuter 1;
- }
-
- // Number of sides.
- // 1 - only extrude.
- // 2 - bevel top and extrude.
- // 3 - bevel bottom and extrude.
- // 4 - bevel both ends and extrude.
- //
- if ($forceFactorySettings || !`optionVar -exists bevelPlusNSides`){
- optionVar -intValue bevelPlusNSides 4;
- }
-
- // Number of caps.
- // 1 - None
- // 2 - At Start
- // 3 - At End
- // 4 - At Start and End
- //
- if ($forceFactorySettings || !`optionVar -exists bevelPlusCaps`){
- optionVar -intValue bevelPlusCaps 4;
- }
-
- // bevelPlusOutputPolygons (int) -
- // 0 - NURBS
- // 1 - polys
- // 2 - Bezier surfaces (NOT supported at present)
- // 3 - subdivision surfaces
- //
- if ($forceFactorySettings || !`optionVar -exists bevelPlusOutputPolygons`){
- optionVar -intValue bevelPlusOutputPolygons 1;
- }
-
- // Global or local tolerance:
- if( $forceFactorySettings || !`optionVar -exists bevelPlusUseGlobalTol` ){
- optionVar -intValue bevelPlusUseGlobalTol false;
- }
-
- // Tolerance for bevelPlus
- if ($forceFactorySettings || !`optionVar -exists bevelPlusTolerance`){
- optionVar -floatValue bevelPlusTolerance 0.01;
- }
-
- // Now, the poly conversion options:
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyFormat` ) {
- optionVar -iv bevelPlusPolyFormat 2;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyCount` ) {
- optionVar -iv bevelPlusPolyCount 200;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyUseChordRatio` ) {
- optionVar -iv bevelPlusPolyUseChordRatio 0;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyChordRatio` ) {
- optionVar -fv bevelPlusPolyChordRatio 0.1;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyUseChordHeight` ) {
- optionVar -iv bevelPlusPolyUseChordHeight 0;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyChordHeight` ) {
- optionVar -fv bevelPlusPolyChordHeight 1.0;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeU` ) {
- optionVar -iv bevelPlusPolyTypeU 3;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeV` ) {
- optionVar -iv bevelPlusPolyTypeV 3;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberU` ) {
- optionVar -iv bevelPlusPolyNumberU 2;
- }
- if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberV` ) {
- optionVar -iv bevelPlusPolyNumberV 6;
- }
- }
-
-